Skip to content

Update contact multiple surfaces sample#569

Merged
gspencergoog merged 2 commits intogoogle:mainfrom
nan-yu:update-contact-multiple-surfaces-sample
Feb 13, 2026
Merged

Update contact multiple surfaces sample#569
gspencergoog merged 2 commits intogoogle:mainfrom
nan-yu:update-contact-multiple-surfaces-sample

Conversation

@nan-yu
Copy link
Collaborator

@nan-yu nan-yu commented Jan 28, 2026

Description

It updates the sample to use the A2uiSchemaManager from the a2ui-agent python SDK.

Tested:

  • The contact angular client successfully connected to the contact_multiple_surfaces agent and rendered the response correctly.

contact_multiple_surfaces

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new a2ui-agent Python package with a centralized A2uiSchemaManager for handling A2UI schemas. This is a great architectural improvement, moving away from hardcoded schemas in the sample agents. The manager provides robust, multi-layered logic for loading schemas from package resources or the source repository, and includes functionality for bundling, pruning, and validating schemas. The sample agents (contact_lookup and contact_multiple_surfaces) are refactored to use this new manager, simplifying their code and making them more maintainable. The changes also include a Hatch build hook to package the schema files correctly and new tests for the added functionality.

I've found a couple of issues: one in a __main__ block in contact_lookup/prompt_builder.py that would cause a TypeError if run directly, and a logic error in contact_multiple_surfaces/agent.py where a check for a loaded schema was referencing a method instead of a property. I've provided suggestions to fix both. Overall, this is a well-executed and beneficial refactoring.

@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch 2 times, most recently from a2cc041 to 3eb5cf5 Compare January 28, 2026 20:55
@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch 4 times, most recently from a76909c to 09e6b06 Compare February 12, 2026 00:05
@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch from 09e6b06 to 53244c8 Compare February 12, 2026 18:10
@nan-yu nan-yu requested a review from zeroasterisk as a code owner February 12, 2026 18:10
@zeroasterisk
Copy link
Collaborator

Heads up: this PR overlaps with #559 on the CI workflow changes. Will need a rebase after #559 merges.

@google google deleted a comment from gemini-code-assist bot Feb 13, 2026
@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch 2 times, most recently from 0504cba to aa67318 Compare February 13, 2026 21:14
Introduces a `schema_modifiers` parameter to A2uiSchemaManager, allowing
custom callable hooks to transform schemas after loading. This enables
flexible schema customization, such as relaxing strict validation
constraints during testing.
@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch 3 times, most recently from 6d305ad to 8032361 Compare February 13, 2026 21:22
It updates the sample to use the A2uiSchemaManager from the a2ui-agent
python SDK.

Tested:
- [x] The `contact` lit client successfully connected to the
  `contact_multiple_surfaces` agent and rendered the response correctly.
@nan-yu nan-yu force-pushed the update-contact-multiple-surfaces-sample branch from 8032361 to 248ab10 Compare February 13, 2026 21:24
@gspencergoog gspencergoog merged commit 364307e into google:main Feb 13, 2026
7 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Feb 13, 2026
@nan-yu nan-yu deleted the update-contact-multiple-surfaces-sample branch February 13, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants